//
// IUT de Nice / Departement informatique / Module APO Java
// Annee 2011_2012 
//
// Projet Himalaya
//
// Classe Region - Tests unitaires des constructeurs
//                  
// Auteur : T. Cazorla & Y. Seree
// Version 1.0.0
//

import java.util.*;

public class T_Region_N1 {

   public static void main (String[] args) {

      Tests.Begin("_Himalaya.Region", "1.0.0");

         Tests.Design("Controle des constructeurs", 3); {
			
			Tests.Case("constructeur par default"); {
				Region r = new Region();
				Tests.Unit("Region [numero=0, villages=[], Delegation={Bleu=0, Rouge=0, Vert=0, Blanc=0, Jaune=0, Violet=0}]",  r.toString());	
			}
			
            Tests.Case("Premier constructeur"); {
            	
            	ArrayList<Village> village = new ArrayList<Village>();
            	
            	Village v1 = new Village("a");
            	Village v2 = new Village("b");
            	Village v3 = new Village("c");
            	
            	village.add(v1);
            	village.add(v2);
            	village.add(v3);

            	Region r1 = new Region(8, village);
			 Tests.Unit("Region [numero=8, villages=[a, b, c], Delegation={Bleu=0, Rouge=0, Vert=0, Blanc=0, Jaune=0, Violet=0}]",  r1.toString());
            }

            Tests.Case("Second constructeur normal"); {
            	ArrayList<Village> village = new ArrayList<Village>();
            	
            	Village v1 = new Village("a");
            	Village v2 = new Village("b");
            	Village v3 = new Village("c");
            	
            	village.add(v1);
            	village.add(v2);
            	village.add(v3);

            	ArrayList<Village> village2 = new ArrayList<Village>();
            	
            	Village v4 = new Village("e");
            	Village v5 = new Village("f");
            	Village v6 = new Village("g");
            	
            	village2.add(v4);
            	village2.add(v5);
            	village2.add(v6);

                Region r1 = new Region(8, village);
                Region r2 = new Region(2, village2);               


            	Tests.Unit("Region [numero=8, villages=[a, b, c], Delegation={Bleu=0, Rouge=0, Vert=0, Blanc=0, Jaune=0, Violet=0}]",   r1.toString());
                Tests.Unit("Region [numero=2, villages=[e, f, g], Delegation={Bleu=0, Rouge=0, Vert=0, Blanc=0, Jaune=0, Violet=0}]",   r2.toString());
            }
         }
      Tests.End();
   }
}